
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:quality_ticket/generated/l10n.dart';

import 'details/quality_ticket_details.dart';

/*
*
* 界面入口
*
*
* */

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(

      ///第三方插件国际化
      localizationsDelegates: [
        // 本地化的代理类
        GlobalMaterialLocalizations.delegate, //为Material组件库提供的本地化的字符串和其他值
        GlobalWidgetsLocalizations.delegate, // 定义组件默认的文本方向，从左到右或从右到左
        S.delegate,
      ],
      // 应用支持的语言列表
      supportedLocales: S.delegate.supportedLocales,
      localeListResolutionCallback: (locales, supportedLocales) {
        return;
      },

      debugShowCheckedModeBanner: false,
      builder: (context, widget) {
        return MediaQuery(
          data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
          child: widget,
        );
      },
      home: DetailsPage(),
    );
  }
}